/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "C_动态插座.h"

using namespace std;



C_动态转换插座::C_动态转换插座(string name) :C_插座基类(name, E_值类型::e_插座Type_动态转换) {

}

C_动态转换插座::~C_动态转换插座() {
}

void C_动态转换插座::f_setData(void* data, int64 ID){

}

PyObject* C_动态转换插座::f_bl_传入数据(PyObject* bl_data) {
	return nullptr;
}

PyObject* C_动态转换插座::f_输出_bl数据(PyObject* bl_data) {
	return nullptr;
}

void C_动态转换插座::f_转换(E_值类型 类型) {

}











C_Socket_Any转PyObject::C_Socket_Any转PyObject(string name)
	:C_插座基类(name, E_值类型::e_插座Type_调试信息)
{
}

C_Socket_Any转PyObject::~C_Socket_Any转PyObject() {
}

void* C_Socket_Any转PyObject::f_getData() {
	PyObject* data = 0;

	C_插座基类* socket = f_getLinkOutSocket();
	if (socket) {
		/*if (socket->m_插座类型 == E_插座类型::e_插座Type_调试信息) {
			return dynamic_cast<C_行文本插座*>(socket)->f_getData();
		}*/

		PyObject* data = socket->f_输出_bl数据((PyObject*)0xffffffff);
		if (!data) {
			Py_IncRef(data);
			return data;
		}
	}

	data = PyList_New(1);
	PyList_SetItem(data, 0, f_string转PyObject("没有输出数据 肯能未定义输出py数据函数"));
	return data;
}

void C_Socket_Any转PyObject::f_setData(void* data, int64 ID)
{
}

PyObject* C_Socket_Any转PyObject::f_输出_bl数据(PyObject* bl_data) {
	PyObject* data = 0;
	this;
	C_插座基类* socket = f_getLinkOutSocket();
	if (socket) {
		PyObject* data = socket->f_输出_bl数据((PyObject*)0xffffffff);
		if (data) {
			Py_IncRef(data);
			return data;
		}
	}

	data = PyList_New(1);
	PyList_SetItem(data, 0, Py_BuildValue(""));
	return data;
}















